package micro.beauty.order.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import micro.beauty.order.converter.OrderConverter;
import micro.beauty.order.dto.OrderResponseDTO;
import micro.beauty.order.entity.Order;
import micro.beauty.order.mapper.OrderMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: Liuliya
 * @CreateDate: 2020/10/15 23:15
 */
@Service
public class OrderService extends ServiceImpl<OrderMapper, Order> {

    public List<OrderResponseDTO> findList() {
        List<Order> orderList = this.list();
        OrderConverter converter = new OrderConverter();
        return converter.list2Dto(orderList);
    }
}
